tool
extends Resource

class_name TileType

# Declare member variables here. Examples:
# var a = 2
# var b = "text"

export(String) var id: String
export(String) var name: String
export(String, MULTILINE) var description: String
export(String) var object_type_id: String

enum TileFlags {
	SUPPORTER = 0x1,
	CHECKPOINT = 0x2,
	TARGET = 0x4,
	EXIT = 0x8,
}

export(int, FLAGS,
	"SUPPORTER",
	"CHECKPOINT",
	"TARGET",
	"EXIT") var flags: int

export(int) var blocked_area_lower: int
export(int) var blocked_area_upper: int

# we only have one appearance,
# since we can test Engine.editor_hint in _ready() of the node
export(PackedScene) var appearance: PackedScene

func create_instance():
	if appearance != null:
		return appearance.instance()
	return null
